#ifndef __SERVER_REQUEST_H__
#define __SERVER_REQUEST_H__

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

#ifdef __cplusplus
extern "C" {
#endif

	struct _pool_s;
	struct net_interface_tag;
	struct event_base;

#define MAX_SIZE 4096
	typedef struct request_tag
	{
		unsigned char       buffer[MAX_SIZE + 1];
		size_t              buffer_size;
		struct sockaddr_in  cliaddr;
		socklen_t           cliaddr_len;

		struct net_interface_tag*    interface;
		struct _pool_s*          pool;
		struct event_base*  evbase;

		void*               userdata;
		void (*userdata_destroy)(void* userdata);
		int sockfd;

	}request_t;

#ifdef __cplusplus
} // end of extern "C" {
#endif
#endif
